/********************************************************************
	Copyright (C) 2006-2008 Lensow
	http://www.lensow.com
	Created:	2008/06/15   17:51
	Filename: 	x:\Lensow\Loplayer\src\app\SkinPanel.h
	Author:		Dean
	
	Purpose:	
*********************************************************************/
#pragma once

#include "SkinControl.h"

// CSkinPanel

class CSkinPanel : public CStatic, public CSkinControl
{
	DECLARE_DYNAMIC(CSkinPanel)

public:
	CSkinPanel();
	virtual ~CSkinPanel();

	int GetBorder() const { return m_border; }
	void SetBorder(const int border);
protected:
	// CSkinControl
	virtual BOOL CreateInternal(const RECT& rect, CWnd* pParentWnd, UINT nID) ;
	virtual BOOL LoadSkinImage(LPCTSTR lpszFilename) ;
	virtual void DrawIt (Gdiplus::Bitmap* pbmWnd, const RECT& rect) ;
	virtual CRect GetPlacement(const INT cxFrame, const INT cyFrame);

	//
	virtual Gdiplus::Bitmap* GetResizePanelBitmap (const int cx, const int cy);

	CAutoPtr<Gdiplus::Bitmap>	m_pbmPanel;
	CAutoPtr<Gdiplus::Bitmap>	m_pbmLeft;
	CAutoPtr<Gdiplus::Bitmap>	m_pbmRight;
	CAutoPtr<Gdiplus::Bitmap>	m_pbmCenter;
	int							m_border;
protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
};


